<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 重复 函数 
    // console.log("*".repeat(3));
    function phone(mobile, len = 3) {
      console.log(typeof mobile);
      return String(mobile).slice(0, len * -1) + '*'.repeat(len)
    }
    console.log(phone(13212111111, 5));
  </script>
</body>

</html>